package net.gxnun.xiaoyuan.core.business.share;

import java.util.HashMap;
import java.util.Map;


/**
 * 用户会话，提供类似HttpSession的功能
 * @author yesheng
 *
 */
public class UserSession {
    
    private Map<String,Object> map = new HashMap<String,Object>();
    
    public void setAttribute(String key,Object obj){
        map.put(key, obj);
    }
    
    public void removeAttribute(String key){
        map.remove(key);
    }
    
    public void clear(){
        map.clear();
    }
    
    public Object getAttribute(String key){
        return map.get(key);
    }
    
}
